﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EPiBoost.Core.Helpers;

namespace EPiBoost.Core
{
	public static class Configuration
	{
		public static class Core
		{
			public static class EditorDescriptors
			{
				public static bool CategoryPropertyHidden = ConfigurationHelper.GetBool("EPiBoost.Core.EditorDescriptors.CategoryPropertyHidden");
			}

			public static class ErrorHandling
			{
				public static bool CustomErrorsEnabled = ConfigurationHelper.GetBool("EPiBoost.Core.ErrorHandling.CustomErrorsEnabled");
				public static int MaxLogItems = ConfigurationHelper.GetInt("EPiBoost.Core.ErrorHandling.MaxLogItems");
				public static bool LogHttpExceptions = ConfigurationHelper.GetBool("EPiBoost.Core.ErrorHandling.LogHttpExceptions");
				public static bool LogExceptions = ConfigurationHelper.GetBool("EPiBoost.Core.ErrorHandling.LogExceptions");

				public static string ExceptionLogRepositoryTypeName = ConfigurationHelper.GetString("EPiBoost.Core.ErrorHandling.ExceptionLogRepositoryTypeName", typeof(Infrastructure.Repositories.InMemoryExceptionLogRepository).FullName);
			}

			public static class Initialization
			{
				public static bool AreaTemplateViewEngineEnabled = ConfigurationHelper.GetBool("EPiBoost.Core.Initialization.AreaTemplateViewEngineEnabled");
				public static bool BasePagePartialControllerInitializerEnabled = ConfigurationHelper.GetBool("EPiBoost.Core.Initialization.BasePagePartialControllerInitializerEnabled");
			}

			public static class Plugins
			{
				public static class RenameNewContentOnSave
				{
					public static bool Enabled = ConfigurationHelper.GetBool("EPiBoost.Core.Plugins.RenameNewContentOnSave.Enabled");
				}
				public static class TrimContentNameOnPublish
				{
					public static bool Enabled = ConfigurationHelper.GetBool("EPiBoost.Core.Plugins.TrimContentNameOnPublish.Enabled");
				}
			}

			public static class Handlers
			{
				public static class PageTypeThumbnailHandler
				{
					public static bool Enabled = ConfigurationHelper.GetBool("EPiBoost.Core.Handlers.PageTypeThumbnailHandler.Enabled");
					public static int BrowserWidth = ConfigurationHelper.GetInt("EPiBoost.Core.Handlers.PageTypeThumbnailHandler.BrowserWidth", 800);
					public static int BrowserHeight = ConfigurationHelper.GetInt("EPiBoost.Core.Handlers.PageTypeThumbnailHandler.BrowserHeight", 600);

				}
			}

			public static class CustomRedirects
			{
				public static bool Enabled = ConfigurationHelper.GetBool("EPiBoost.Core.CustomRedirects.Enabled");
				public static bool OverrideExistingUrls = ConfigurationHelper.GetBool("EPiBoost.Core.CustomRedirects.OverrideExistingUrls");
			}

		}
		public static class CustomDisplayTemplates
		{
			public static bool ContentAreaEnabled = ConfigurationHelper.GetBool("EPiBoost.Core.CustomDisplayTemplates.ContentAreaEnabled");
			public static bool ContentAreaCatchErrorsEnabled = ConfigurationHelper.GetBool("EPiBoost.Core.CustomDisplayTemplates.ContentAreaCatchErrorsEnabled");
		}


	}
}
